<template>
  <div class="nav">
    <div class="logo">
      <img src="/src/assets/logo.png" alt="logo" />
      <div>智能图书柜后台管理</div>
    </div>
    <div class="personal-info" @click="goback">退出</div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";
const router = new useRouter();
const goback = () => {
  localStorage.removeItem("Authorization");
  localStorage.removeItem("AuthenticationCode");
  router.push("/login");
};
</script>

<style lang="scss" scoped>
.nav {
  height: 100%;
  background: #464445;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px 0 10px;
  .logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 24px;
    img {
      height: 24px;
      margin-right: 10px;
    }
  }
  .personal-info {
    color: #fff;
    &:hover {
      color: #3b78b1;
    }
  }
}
</style>